package com.example.controller;

import org.flowable.engine.RepositoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.entity.Region;
import com.example.mapper.RegionMapper;

import cn.hutool.json.JSONUtil;
import jakarta.annotation.Resource;

@RestController
public class ApiController {

	@Resource
	RegionMapper regionMapper;
	
	@Resource
	RepositoryService repositoryService;
	
	@GetMapping("/")
	public String info() {
//		List<ActReDeployment> list = actReDeploymentMapper.selectList(Wrappers.lambdaQuery(ActReDeployment.class));
		
		Region region = regionMapper.selectById(1l);
		
		System.err.println(JSONUtil.toJsonPrettyStr(region));
		
		long nums = repositoryService.createDeploymentQuery().count();
		System.err.println("nums="+nums);
		return "hello world";
	}
}
